import request from '@/utils/request.js'

/*
* 获取文章分类列表
* */
export const artGetChannelsService = (data) => {
  return request({
    url: '/my/cate/list',
    method: 'post',
    data
  })
}

// 添加文章分类
export const artAddChannelService = (data) => {
  return request({
    url: '/my/cate/add',
    method: 'post',
    data
  })
}

// 编辑分类
export const artEditChannelService = (data) => {
  return request({
    url: '/my/cate/info',
    method: 'post',
    data
  })
}

// 删除文章
export const artDelChannelService = (params) => {
  return request({
    url: '/my/cate/del',
    method: 'delete',
    params
  })
}

/*
* 获取文章管理列表
* */
export  const  artGetListService = (params) => {
  return request({
    url: '/my/article/list',
    method: 'delete',
    params
  })
}


/*
* 发布文章
* */
export const artPublishService = (data) => {
  return request({
    url: '/my/article/add',
    method: 'post',
    data
  })
}

/*
* 编辑回显
* */
export const artGetDetailService = (params) => {
  return request({
    url: '/my/article/info',
    method: 'get',
    params
  })
}

/*
* 编辑文章接口
* */
export const artEditService = (data) => {
  return request({
    url: '/my/article/info',
    method: 'put',
    data
  })
}
/*
* 文章删除
* */
export const artDelService = (params) => {
  return request({
    url: '/my/article/info',
    method: 'delete',
    params
  })
}
